import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('../views/index/index.vue'),
    children: [
      { path: '/', redirect: 'lookMusic' },
      {
        path: 'lookMusic',
        component: () => import('../views/index/childRoute/lookMusic.vue'),
        children: [
          { path: '/lookMusic', redirect: 'geXing' },
          {
            path: 'geXing',
            component: () => import('../views/index/childRoute/lookMusicChildRouter/geXing.vue'),
          },
          {
            path: 'geDan',
            component: () => import('../views/index/childRoute/lookMusicChildRouter/geDan.vue'),
          },
          {
            path: 'paiHangBang',
            component: () => import('../views/index/childRoute/lookMusicChildRouter/paiHangBang.vue'),
          },
          {
            path: 'geShou',
            component: () => import('../views/index/childRoute/lookMusicChildRouter/geShou.vue'),
          },
          {
            path: 'newSong',
            component: () => import('../views/index/childRoute/lookMusicChildRouter/newSong.vue'),
          },
        ]
      },
      {
        path: 'shiping',
        component: () => import('../views/index/childRoute/shiping.vue'),
      },
      {
        path: 'pengyou',
        component: () => import('../views/index/childRoute/pengyou.vue'),
      },
      {
        path: 'zhibo',
        component: () => import('../views/index/childRoute/zhibo.vue'),
      },
			{
				path:'geDanInfo',
				component: () => import('../views/index/geDanInfo/geDanInfo.vue'),
			},
      {
				path:'setUp',
				component: () => import('../views/index/setUp/setUp.vue'),
			},
      {
				path:'video',
				component: () => import('../views/index/video/video.vue'),
			},
      {
				path:'geShou',
				component: () => import('../views/index/geShou/geShou.vue'),
			},
      {
				path:'yongHu',
				component: () => import('../views/index/yongHu/yongHu.vue'),
			},
      {
				path:'userFolloweds',
				component: () => import('../views/index/userFolloweds/userFolloweds.vue'),
			},
      {
				path:'dongTai',
				component: () => import('../views/index/dongTai/dongTai.vue'),
			},
      {
				path:'searchInfo',
				component: () => import('../views/index/searchInfo/searchInfo.vue'),
			},
      {
				path:'zhuanJi',
				component: () => import('../views/index/zhuanJi/zhuanJi.vue'),
			},
    ]
  }
]

const router = new VueRouter({
  mode:process.env.IS_ELECTRON ? 'hash': 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
